package controllers;

import java.util.List;

import models.AppUser;
import play.mvc.Controller;

public class WebService extends Controller{
    
    public static void register(final String param) {
        
        System.out.println("Registration ID: ["+param.substring(0, 12)+"...]");
        AppUser appUser = null;
        try {
            appUser = AppUser.find("mobileID=?", param).first();
            
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        
        if (appUser== null) {
            new AppUser(param, "unbekannter", "Freak").save();
        }
    }

}
